package com.logic;

import java.util.TreeMap;

import com.database.*; /*Remove when server side is modiied*/

public class ServerSideSmsRequest {
	private ServerSmsDataBase serverSmsDataBase = null;

	private TreeMap<String, String> subscribeMap = null;

	public ServerSideSmsRequest() {
		serverSmsDataBase = new ServerSmsDataBase();
	}

	public TreeMap SmsSubscribe(String accountNum) {

		//subscribeMap = serverSmsDataBase.SmsSubscribeDb(accountNum);
		return subscribeMap;
	}

	public String SmsUnsubscribe(String accountNum) {
		String resultUnsub = serverSmsDataBase.SmsUnsubscribeDb(accountNum);
		return resultUnsub;
	}

	//public TreeMap<String, String> SmsTransaction(String pinNum) {
	//	TreeMap<String, String> lastTrans = serverSmsDataBase
		//		.SmsLastTransaction(pinNum);

		//return lastTrans;
	//}
	public String SmsIssuedCheque(String pinNum,String che)
	{
		String issuedChequeAmt=serverSmsDataBase.SmsIssuedCheque(pinNum, che);
		System.out.println(issuedChequeAmt);
		return issuedChequeAmt;
	}
	
	public String SmsDepositedCheque(String pinNum,String che)
	{
		String depositedChequeAmt=serverSmsDataBase.SmsDepositedCheque(pinNum, che);
		System.out.println(depositedChequeAmt);
		return depositedChequeAmt;
	}
	
	public String SmsChangePin(String oldPin,String newPin)
	{
		String result=serverSmsDataBase.SmsChangePin(oldPin,newPin);
		return result;
	}
	public static void main(String[] args) {
		new ServerSideSmsRequest().SmsChangePin("111","1");
	}
}
